from typing import Any, Awaitable as _Awaitable, TypeVar

from dependency_injector import providers

T = TypeVar("T")

class Application(providers.Singleton[T]): ...
class Extension(providers.Singleton[T]): ...
class Middleware(providers.DelegatedCallable[T]): ...
class MiddlewareFactory(providers.Factory[T]): ...

class View(providers.Callable[T]):
    def as_view(self) -> _Awaitable[T]: ...

class ClassBasedView(providers.Factory[T]):
    def as_view(self) -> _Awaitable[T]: ...
